# 使用轻量级 Python 镜像
FROM python:3.9-slim

# 设置工作目录
WORKDIR /app

# 复制代码到容器
COPY . /app

# 安装 FastAPI 依赖
RUN pip install fastapi uvicorn python-multipart requests

# 确保 uploads 目录存在
RUN mkdir -p /app/uploads

# 运行 FastAPI
CMD ["uvicorn", "upload_service:app", "--host", "0.0.0.0", "--port", "8000"]
